package com.bg.sparkproject.pattern.decorate;

/**
 * @Auther: zhengshunzhi
 * @Date: 2019/1/4 11:15
 * @Description: Man的装饰者增强
 */
public class ManDecorator extends Decorate {

    @Override
    public void eat() {
        super.eat();
        drink();
    }

    public void drink() {
        System.out.println("男人在喝酒");
    }

    public static void main(String[] args) {
        ManDecorator manDecorator = new ManDecorator();
        manDecorator.setPerson(new Man());
        manDecorator.eat();
    }
}
